<?php echo $this->element('menu', array("active" => "9.b"));?>
<ul class="breadcrumb">
	<li>
          <?php echo $this->Html->link(__('Companies  ', true), array('controller' => 'companies','action' => 'index'), array('class'=>'fist_link'));?>
        </li>
        <li>
          <a href="#" ><?php __('Company') ?>  </a>
    </li>
 </ul>
<div id="content">
<div id="left" class="hight_resize" >
<?php echo $this->Html->link(__('Add Company', true), array('action' => 'add'),array('class' => 'bt f_r m_t_15')); ?>
    <div class="table table_p_15_2 boder">	
    <table width="100%" cellpadding="0" cellspacing="0">
    <thead>
	<tr>
			<td><?php echo $this->Paginator->sort('name');?></td>
			<td><?php echo $this->Paginator->sort('address');?></td>
			<td><?php echo $this->Paginator->sort('city');?></td>
			<td><?php echo $this->Paginator->sort('phone');?></td>
			<td></td>
	</tr>
    </thead>
    <tbody>
	<?php
	$i = 0;
	foreach ($companies as $company):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $company['Company']['name']; ?>&nbsp;</td>
		<td><?php echo $company['Company']['address']; ?>&nbsp;</td>
		<td><?php echo $company['Company']['city']; ?>&nbsp;</td>
		<td><?php echo $company['Company']['phone']; ?>&nbsp;</td>
		<td class="actions">			
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $company['Company']['id'])); ?> |
			<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $company['Company']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $company['Company']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
    </tbody>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
	));
	?>	</p>
</div>
	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
</div>